var href = location.href;
var matches = href.match(/\?taskId=([^&]+)/);
var entityId =matches[1];
jQuery('.app-btn-pass').on('click', function() {
	var url = window.rootPath + "/ui/crmout/BeforeContractCounterSign/" + entityId;
	if(jQuery("#auditAdvice").val() == "" || jQuery("#auditAdvice").val() == undefined){
		alert("会签说明不能为空！");
		return;
	}
	//jQuery('#loadingImage').show();
	jQuery(".btn").attr("disabled", true);
	var d = {
			"auditAdvice" : jQuery('#auditAdvice').val(),
	};
	jQuery.ajax({
		type : 'get',
		url : url,
		data : JSON.stringify(d),
		dataType : 'json',
		contentType : 'application/json;charset=utf-8',
		success : function() {
			jQuery(".btn").attr("disabled", false);
			window.location = window.rootPath + '/ui/index';
		}
	});
});
